import java.util.Random;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Random random = new Random();
        int num = random.nextInt(100);//限制范围为[0,100）
        System.out.println(num);
        while(true){
            System.out.println("请输入你要猜的数字：");
            int n = scanner.nextInt();
            if(num<n){
                System.out.println("猜大了");
            }else if(num>n){
                System.out.println("猜小了");
            }else{
                System.out.println("恭喜你，猜对了");
                break;
            }
        }
    }
}